plat/arm: enlarge the BL2 size on Arm platforms when TBB is enabled
authorQixiang Xu <[email protected]>
Fri, 13 Oct 2017 01:23:42 +0000 (09:23 +0800)
committerQixiang Xu <[email protected]>
Wed, 25 Oct 2017 01:27:15 +0000 (09:27 +0800)
For Trusted Board Boot, BL2 needs more space to support the ECDSA
and ECDSA+RSA algorithms.

Change-Id: Ie7eda9a1315ce836dbc6d18d6588f8d17891a92d
Signed-off-by: Qixiang Xu <[email protected]>
include/drivers/auth/mbedtls/mbedtls_config.h
include/plat/arm/board/common/board_arm_def.h
plat/arm/board/juno/include/platform_def.h

index ca2d9fad8d1f9da6b3b7c3e4d9777b129f90440e..96587acae2101d0bbda34d16eb819fceb6367f98 100644 (file)
 #define MBEDTLS_MPI_WINDOW_SIZE              2
 #define MBEDTLS_MPI_MAX_SIZE               256
 
-/* System headers required to build mbed TLS with the current configuration */
-#include <stdlib.h>
-
 /* Memory buffer allocator options */
 #define MBEDTLS_MEMORY_ALIGN_MULTIPLE        8
 
+#ifndef __ASSEMBLY__
+/* System headers required to build mbed TLS with the current configuration */
+#include <stdlib.h>
 #include "mbedtls/check_config.h"
+#endif
 
 #endif /* __MBEDTLS_CONFIG_H__ */
index 49ab601b00fcc79568ca5336e37f325bffa948b9..93828c9d4e467233a061030c62fc7d8a21ce1af1 100644 (file)
@@ -71,7 +71,7 @@
  * little space for growth.
  */
 #if TRUSTED_BOARD_BOOT
-# define PLAT_ARM_MAX_BL2_SIZE         0x1D000
+# define PLAT_ARM_MAX_BL2_SIZE         0x1E000
 #else
 # define PLAT_ARM_MAX_BL2_SIZE         0xF000
 #endif
index 395d1fb6db158fe9c978202d48ff0051f1c11d9b..ccc7771e59c80cdbbf86fec6dadc464a278aed31 100644 (file)
@@ -12,6 +12,9 @@
 #include <board_css_def.h>
 #include <common_def.h>
 #include <css_def.h>
+#if TRUSTED_BOARD_BOOT
+#include <mbedtls_config.h>
+#endif
 #include <soc_css_def.h>
 #include <tzc400.h>
 #include <v2m_def.h>
  * little space for growth.
  */
 #if TRUSTED_BOARD_BOOT
-# define PLAT_ARM_MAX_BL2_SIZE         0x19000
+#if TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA
+# define PLAT_ARM_MAX_BL2_SIZE         0x1E000
+#else
+# define PLAT_ARM_MAX_BL2_SIZE         0x1A000
+#endif
 #else
 # define PLAT_ARM_MAX_BL2_SIZE         0xC000
 #endif